{extend name="../front" /}
{block name="head"}<title>用户中心－{:config('site.name')}</title>{/block}
{block name="main"}
<main class="container position-relative py-3">
  {include file='navbar' /}
  <div class="card mb-3">
    <div class="card-body">
      <div class="card-title fw-bold mb-3">每邀请一个好友奖励<strong class="mx-1 text-primary">{:config('score.reward')}</strong>积分</div>
      <div class="input-group input-group-sm">
        <input class="form-control" type="text" id="inviteUrl" value="{:url('index/signup/index',['pid'=>$user_id],false,true)}" placeholder="推广链接">
        <button class="btn btn-primary" type="button" id="btn-copy" data-clipboard-action="copy" data-clipboard-target="#inviteUrl">复制</button>
      </div>
    </div>
  </div>
  <div class="card">
    <div class="card-body">
      <div class="card-title fw-bold">积分充值</div>
      <p class="card-text text-muted">充值比例（1:{:config('score.recharge')}）1元人民币可兑换（{:config('score.recharge')}）积分。</p>
      <div class="row row-cols-2 g-4">
        {foreach [1,5,10,20,50,100,200,500] as $key=>$value}
        <div class="col d-grid">
          <a class="btn btn-block bg-gray py-3" href="{:dcUrl('user/alipay/recharge',['price'=>$value])}" data-toggle="recharge">
            <h4 class="text-primary">{$value}元</h4>
            <div class="text-muted fs-0">兑换（{:config('score.recharge')*$value}）积分</div>
          </a>
        </div>
        {/foreach}
      </div>
    </div>
  </div>
</main>
{/block}